import request from '@/router/axios';
import {baseUrl} from "@/config/env";

export const getList = (current, size, params) => {
  // console.log("???")
  return {
    data: {
      data: {
        total: 4,
        records: [
          {
            title: '11111111111111111',
            createTime: "2020-01-01 05:09:19",
            type: '1'
          }, {
            title: '11111111111111111',
            createTime: "2020-01-01 05:09:19",
            type: '1'
          }, {
            title: '11111111111111111',
            createTime: "2020-01-01 05:09:19",
            type: '1'
          }, {
            title: '11111111111111111',
            createTime: "2020-01-01 05:09:19",
            type: '1'
          },
        ]
      }
    }
  }
  //
  // return request({
  //   url: `${baseUrl}/enterprise/esmscry/list`,
  //   method: 'get',
  //   params: {
  //     ...params,
  //     current,
  //     size,
  //   }
  // })
}

export const getDetail = (id) => {
  return request({
    url: `${baseUrl}/enterprise/esmscry/detail`,
    method: 'get',
    params: {
      id
    }
  })
}

export const remove = (ids) => {
  return request({
    url: `${baseUrl}/enterprise/esmscry/remove`,
    method: 'post',
    params: {
      ids,
    }
  })
}

export const add = (row) => {
  return request({
    url: `${baseUrl}/enterprise/esmscry/submit`,
    method: 'post',
    data: row
  })
}

export const update = (row) => {
  return request({
    url: `${baseUrl}/enterprise/esmscry/submit`,
    method: 'post',
    data: row
  })
}

